.commit-detail-page {
  height: 100%;
  background-color: $snow;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  animation: commitDetailOpen 0.3s forwards;
  .commit-detail-close-icon {
    position: absolute;
    top: 10px;
    right: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20;
  }
  .loading-box {
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .commit-detail-header {
    position: relative;
    margin-bottom: 16px;
    padding-right: 15px;
    // border-bottom: 1px solid $gray-02;
    // padding: 0 20px 10px;
    &-title {
      display: flex;
      align-items: center;
      justify-content: space-between;
      // margin-top: 18px;
      &-left {
        display: flex;
        align-items: center;
        flex: 1;
        flex-wrap: wrap;
        line-height: 30px;
        margin-right: 20px;
        width: calc(100% - 500px);
        .msg-title {
          font-size: 20px;
          color: var(--color-text1-4, #292929);
          font-weight: 500;
          max-width: calc(100% - 100px);
          padding: 5px 0;
        }
        .scan-result {
          line-height: normal;
        }
      }
      &-right {
        position: relative;
        display: flex;
        align-self: flex-start;
        align-items: center;
        height: 32px;
        justify-content: flex-end;
        &-split-line {
          height: 20px;
          width: 1px;
          background: $gray-02;
          margin: 0 12px;
          flex-shrink: 0;
        }
        .toggle-more-btn {
          flex-shrink: 0;
        }
        .more-btn {
          display: flex;
          align-items: center;
        }
        .more-btn-dropdown-trigger {
          display: none;
        }
        &-context {
          display: flex;
          align-items: center;
          background: $snow;
          .commit-id-src-group {
            display: flex;
            margin-right: 0;
            .commit-id-btns {
              display: flex;
            }
          }
          .compare-btn {
            margin-left: 20px;
          }
          .remove-btn {
            margin-left: 20px;
            color: $gray-06;
          }
          .src-btn {
            margin-left: 8px;
          }
        }
      }
    }

    .commit-detail-title {
      text-align: left;
      line-height: 44px;
      font-size: 20px;
      color: #383838;
      word-break: break-word;
      font-weight: 500;
    }
    .commit-detail-des {
      // max-width: 800px;
      // padding-left: 8px;
      margin-top: 6px;
      text-align: left;
      line-height: 20px;
      font-size: 14px;
      color: $gray-06;
      // border-left: 1px solid $gray-04;
      max-height: 200px;
      overflow-x: hidden;
      overflow-y: auto;
      // pre标签有公共样式，需要覆盖
      .commit-detail-des-pre {
        background-color: #fff;
        border: none;
        color: $gray-06;
        padding-left: 0;
        padding-bottom: 0;
        margin-bottom: 0;
      }
    }
  }
  .filter-no-data {
    margin-top: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  // 覆盖集团版吊顶
  &.important-zindex-ali {
    z-index: 1001;
  }
}

.branch-icon-color {
  color: $gray-06;
}

.builds-and-author {
  // 设置高度，为了适应uiless build组件的高度
  height: 28px;
  display: flex;
  align-items: center;
  .user-action-time {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-right: 2px;
    .user-action-des {
      line-height: 20px;
      font-size: 12px;
      color: $gray-06;
      margin-left: 8px;
    }
    .at-text-avatar-addedText {
      margin-left: 8px;
      max-width: 200px;
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
      font-size: 12px;
    }
    .user-action-time-add-text-autor {
      font-size: 12px;
      color: var(--color-text1-2, #6e6e6e);
    }
  }
}
.more-btn-dropdown-content {
  width: 200px;
  & > div {
    height: 36px;
    text-align: left;
    line-height: 36px;
    font-size: 14px;
    color: $gray-08;
    position: relative;
    &:hover {
      background-color: $gray-01;
    }
    a {
      position: absolute;
      width: 100%;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      height: 36px !important;
      line-height: 36px !important;
      text-align: left;
      padding-left: 16px !important;
    }
  }
}

// @media screen and (max-width: 1200px) {
//   .commit-detail-page .commit-detail-header-title-left .msg-title {
//     margin-right: 0;
//     padding-right: 0;
//     border-right: none;
//     max-width: 100%;
//   }
//   .commit-detail-page .commit-detail-header {
//     position: relative;
//     height: 100px;
//   }
//   .builds-and-author {
//     // position: absolute;
//     min-width: 485px;
//     top: 58px;
//   }
// }

@media screen and (max-width: 800px) {
  .commit-detail-page .commit-detail-header-title-left {
    width: calc(100% - 317px);
  }
  .commit-detail-page .commit-detail-header-title-right .more-btn-dropdown-trigger {
    display: flex;
  }
  .commit-detail-page .commit-detail-header-title-right .more-btn {
    display: none;
  }
}

@keyframes commitDetailOpen {
  from {
    top: -400px;
    opacity: 0;
  }
  to {
    top: 0;
    opacity: 1;
  }
}

@keyframes commitDetailClose {
  from {
    top: 0;
    opacity: 1;
  }
  to {
    top: -400px;
    opacity: 0;
  }
}

.commit-detail-header-icon-return {
  cursor: pointer;
}

.commit-detail-author-list {
  display: flex;
  padding: 12px 0 6px;
}

.changes-container-right.has-comment .diff-line {
  .diff-gutter[data-line-number] {
    // TODO 以后去掉，commit和compare暂时不让gutter有cursor，cr的有cursor
    cursor: pointer;
    // hover到行号上出现评论提示
    &:hover {
      position: relative;
      &::after {
        position: absolute;
        font-family: sans-serif;
        content: '';
        background: var(--primary-brand, #1b9aee)
          url('https://img.alicdn.com/tfs/TB1V_Z3l8r0gK0jSZFnXXbRRXXa-200-200.png');
        color: #fff;
        padding: 2px;
        border-radius: 2px;
        top: 0;
        left: 34px;
        width: 20px;
        height: 20px;
        cursor: pointer;
        z-index: 1;
        background-origin: content-box;
        background-size: 16px 16px;
        background-repeat: no-repeat;
        background-position: center center;
      }
    }
  }
  .diff-code {
    position: relative;
    .diff-code-comment-icon {
      display: none;
      position: absolute;
      font-family: sans-serif;
      content: '';
      background: var(--primary-brand, #1b9aee)
        url('https://img.alicdn.com/tfs/TB1V_Z3l8r0gK0jSZFnXXbRRXXa-200-200.png');
      color: #fff;
      padding: 2px;
      border-radius: 2px;
      top: 0;
      left: -5px;
      width: 20px;
      height: 20px;
      cursor: pointer;
      z-index: 1;
      background-origin: content-box;
      background-size: 16px 16px;
      background-repeat: no-repeat;
      background-position: center center;
    }
    &:hover {
      .diff-code-comment-icon {
        display: block;
      }
    }
    &.diff-code-omit:hover {
      .diff-code-comment-icon {
        display: none;
      }
    }
  }
}
